#ifndef _MAX7219_H
#define _MAX7219_H

#include "Arduino.h"
#include "pixelbuffer.h"
#include "settings.h"


class Max7219 {
  private: 
  
  public:
    PixelBuffer *pixelbuffer;

    void init(void);
    void set_illumination(int illumination_level);
    void set_pixelbuffer(PixelBuffer &pixbuf);
    PixelBuffer* get_pixelbuffer(void);
    void show(void);

    Max7219(void) {
      this->init();
    };
    Max7219(PixelBuffer &pixbuf): pixelbuffer(&pixbuf) {
      this->init();
    };
};


void test_max_setup(void);
void test_max_loop(void);

#endif  // _MAX7219_H